package com.salon.client;
import com.extjs.gxt.ui.client.Registry;
import com.extjs.gxt.ui.client.event.Events;
import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.event.WindowEvent;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyUpEvent;
import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.salon.client.widgets.LoginDialog;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Salon implements EntryPoint {
	public static final String SERVICE = "greet";
	public void onModuleLoad() {
		GreetingServiceAsync service = (GreetingServiceAsync) GWT.create(GreetingService.class);
	    ServiceDefTarget endpoint = (ServiceDefTarget) service;
	    String moduleRelativeURL = SERVICE;
	    endpoint.setServiceEntryPoint(moduleRelativeURL);
	    Registry.register(SERVICE, service);
	    
	    //LoginDialog dialog = new LoginDialog();
	   // dialog.setClosable(false);
	   // dialog.addListener(Events.Hide, new Listener<WindowEvent>() {
	    //  public void handleEvent(WindowEvent be) {
	    	  MainView main = new MainView();
	    	  RootPanel.get().add(main);
	    //  }
	   // });
	   // dialog.show();
	}
}
